package android.longs.study.upgrade.servlert;

import javax.servlet.ServletContext;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import android.longs.study.base.HomeServlet;
import android.longs.study.upgrade.service.UpgradeService;
import android.longs.study.upgrade.service.UpgradeServiceImple;

@WebServlet("/add/upgrade")
public class AddUpgradeVersonServlert extends HomeServlet {

    private UpgradeService service = new UpgradeServiceImple();

    @Override
    public void doRequestFunction(HttpServletRequest request,
	    HttpServletResponse response) {

	try {
	    ServletContext servletContext = getServletContext();
	    System.out.println("添加版本信息.... .. .. ");
	    String queryLastVersion = service.addUpgradeModel(request);
	    System.out.println("添加 "+queryLastVersion);
	    response.getWriter().write(queryLastVersion);
	} catch (Exception e) {
	    System.out.println("获取版本信息异常  "+e.getMessage());
	}



    }

}
